﻿#ifndef __MCCOMMANDMANAGER_H_
#define __MCCOMMANDMANAGER_H_

#include <MCMouseReceiver.h>
#include <IKeyArgs.h>
#include <ICanvas.h>

class MCCommand;

class MCCommandManager : public MCMouseReceiver
{
public:

    MCCommandManager(ICanvas *presenter);
    ~MCCommandManager();

    ICanvas *getPresenter();

    void setCommand(MCCommand *command);       
    void finishCurrentCommand();                  
    bool hasCommand();                           

    void onMouseDown(IMouseArgs &args) override;
    void onMouseUp(IMouseArgs &args) override;
    void onMouseMove(IMouseArgs &args) override;
    void onKeyDown(IKeyArgs &args);

private:

    MCCommand *_currentCommand;
    ICanvas *_presenter;

};

#endif // __MCCOMMANDMANAGER_H_
